import React from "react";
import "./index.scss";

interface IControlProps {
  name: string;
  key: string;
  icon: string;
  [key: string]: any;
}
export default class Control extends (React.PureComponent || React.Component)<IControlProps> {
  render() {
    const { name, icon } = this.props;
    return <div className="control-wrapper">
      {
        icon && <div className="control-icon-wrapper">
          <img src={icon} alt={name} />
        </div>
      }
      <span className="control-name">{ name }</span>
    </div>
  }
}